<template>
  <div class="about">
    <div class="avatar">
      <img src="/static/images/avatar.jpg" alt />
    </div>
    <p class="abname">HelloWord | {{author.name}}</p>
    <p class="abposition">{{author.label}}</p>
    <div class="abtext">{{author.introduction}}</div>
  </div>
</template>

<script>
import { mapMutations, mapState, mapActions } from "vuex";

export default {
  data() {
    return {
      author: {
        name:'',
        label:'',
        introduction:''
      }
    };
  },
  created() {
    this.getAuthorInfo();
  },
  computed: {
    ...mapState({
      showHeader: state => state.showHeader
    })
  },
  mounted(){
    console.log(this.showHeader)
  },
  methods: {
    getAuthorInfo() {
      this.$http({
        url: this.$http.adornUrl("/api/public/author/info"),
        method: "get",
        params: this.$http.adornParams()
      }).then(({ data }) => {
        if (data && data.code === 0) {
          this.author = data.data;
        }
      });
    }
  }
};
</script>

<style lang="scss">
  
</style>


